<?php

$loader = require_once __DIR__  . '/vendor/autoload.php';

Core\Application::init($loader);

$server = new Swoole\Http\Server('0.0.0.0', 18306);
$server->on('request', function ($request, $response){
    //var_dump(1111111);
    $result = \Core\Route::dispatch($request->server['path_info']);
    $response->end($result);
});

$server->start();
